<include file="Public:header"/>
<link rel="stylesheet" href="__WEBPUBLIC__/Uploadify/uploadify.css" type="text/css" />
<div id="main-content" class="content">
    <ul class="breadcrumb">
        <li><a href="/">首页</a></li>
        <li class="active"><a href="">项目管理</a></li>
        <li class="active">项目列表</li>
    </ul>
    <div class="page-header clearfix">
        <h3>项目管理</h3>
        <ul class="nav nav-tabs">    
            <li>
                <a href="{:U('Project/selectProject')}">项目列表</a>
            </li>
            <li  class="active">
                <a href="{:U('Project/addProject')}">添加项目</a>
            </li>
        </ul>
    </div>

    <div class="content-box-table">
        <form action="{:U('Project/addProject')}" method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
            <div class="form-group">
                <label for="p_name" class="col-sm-3 control-label">项目名称：</label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="p_name" name="p_name">
                </div>
            </div>
            <div class="form-group">
                <label for="p_api_head" class="col-sm-3 control-label">API链接：</label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="p_api_head" name="p_api_head" value="http://">
                </div>
            </div>
            <div class="form-group">
                <label for="p_api_head" class="col-sm-3 control-label">客户列表：</label>
                <div class="col-sm-9">
                <volist name="member_list" id="vo" mod="10">
                    <input type="radio" value="{$vo.m_id}" name="own_m_id" class="own_m_id"/>&nbsp;{$vo['m_nickname']}&nbsp;&nbsp;&nbsp;&nbsp;
                </volist>
                </div>
            </div>
            <div class="form-group">
                <label for="p_logo" class="col-sm-3 control-label">项目封面：</label>
                <div class="col-sm-9" id="plogo">
                    <div>
                        <img src="__ROOT__/Uploads/pLogo/default.gif" id="upImg" />
                        <input type="hidden" id="p_logo"  name="p_logo"/>
                    </div>
                    <input id="file_upload" name="p_logo" type="file" multiple="true" value="" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                  <button type="submit" class="btn btn-default btn-primary">确认添加</button>
                </div>
            </div>
        </form>
    </div>


</div>
<script type="text/javascript" src='__PUBLIC__/Uploadify/jquery.uploadify.min.js'></script>
<script>
    var img = '';
    $('#file_upload').uploadify({
        swf : '__PUBLIC__/Uploadify/uploadify.swf',  //引入Uploadify核心Flash文件
        uploader : '{:U("AdminBasic/upload")}',   //PHP处理脚本地址
        width : 128,    //上传按钮宽度
        height : 128,    //上传按钮高度
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',   //允许选择的文件类型
        'onUploadSuccess' : function(file, data, response) {
          $('#upImg').attr('src','__ROOT__/Uploads/pLogo/{$time|tiem_ym=###}/'+data); 
          $('#p_logo').val('{$time|tiem_ym=###}/'+data);
      }
    });
</script>
<include file="Public:footer"/>